package day0728;

import java.util.Arrays;

public class Test4 {
    public static void main(String[] args) {
        int[]  r=getNums(16);
        System.out.println(Arrays.toString(r));
    }

    private static int[] getNums(int i) {//如何用return将结果返回。
        int[]  rs=new int[i-2];
        int  index=0;
        for (int j = 2; j < i; j++) {//2   .....  15
            if(i%j == 0){
                rs[index++]=j;
            }
        }
       return  rs;
    }
}
